let initState = () => ({
  navTheme: 'white',
  // 拂晓蓝
  primaryColor: '#1890ff',
  // layout: 'mix',
  contentWidth: 'Fluid',
  fixedHeader: true,
  fixSiderbar: true,
  colorWeak: false,
  title: '',
  pwa: false,
  iconfontUrl: process.env.iconFontUrl,
});

export default {
  namespace: 'settings',
  state: { ...initState() },
  effects: {},
  reducers: {
    setState(state, { payload }) {
      return { ...state, ...payload };
    },
    init(state, { payload }) {
      return { ...initState(), ...payload };
    },
  },
};
